package com.tbq.game.service.socket.rxbus

import com.jakewharton.rxrelay2.Relay
import io.reactivex.Observable
import io.reactivex.Observer
import io.reactivex.disposables.Disposable
import io.reactivex.functions.Consumer
import io.reactivex.subjects.PublishSubject


class RxBus {
    private val bus = PublishSubject.create<Any>()
    fun send(o: Any) {
        bus.onNext(o)
    }

    fun toObservable(): Observable<Any> {
        return bus

    }
}